<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

<ui:composition template="index.xhtml">
	<ui:define name="conteudo">
		<f:view>

			<h:form id="form">
				<p:growl id="msgs" />

				<p:panel header="Cadastrar Fornecedor">
					<h:panelGrid columns="2" id="grid">

						<h:outputText value=" Nome: *" />
						<p:inputText required="true" label="nome" size="60"
							value="#{FornecedorBean.fornecedor.nome}" />

						<h:outputText value="Email : *" />
						<p:inputText required="true" label="email" size="40"
							value="#{FornecedorBean.fornecedor.email}" />

						<h:outputText value=" Telefone: *" />
						<p:inputText required="true" label="telefone" size="15"
							value="#{FornecedorBean.fornecedor.telefone}" />

						<h:outputText value=" Celular: *" />
						<p:inputText required="true" label="celular" size="15"
							value="#{FornecedorBean.fornecedor.celular}" />

						<h:outputLabel for="marca" value=" Marca: *" />
						<h:selectOneMenu required="true" value="#{FornecedorBean.idMarca}">
							<f:selectItem itemValue="" itemLabel="Selecione..." />
							<f:selectItems value="#{MarcaBean.marcas}" />
						</h:selectOneMenu>

						<p:commandButton value="Limpar" type="reset" />

						<p:commandButton id="btn_incluir" value="Incluir"
							update="msgs @parent" ajax="false"
							action="#{FornecedorBean.incluirFornecedor}">
						</p:commandButton>

					</h:panelGrid>

				</p:panel>
			</h:form>
		</f:view>
	</ui:define>
</ui:composition>
</html>